package tset1;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;

public class ABC {
    public static void main(String[] args) throws InterruptedException {
        //阻塞队列   put take 有阻塞效果
        BlockingQueue<String> queue=new LinkedBlockingDeque<>(100);
        //capacity 容量
        //进队列
        queue.put("intoQueue");
        //出队列
        String elem=queue.take();
        System.out.println(elem);
    }
}
